using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BaHuan.Common;
using BaHuan.Entities;
using BaHuan.DataLayer;
/*
 * There are many processes that handle the flows of data
 * we call them business logic of a program.
 * For each of business logic process we create a class 
 * that handle for that process
 * 
 * */
namespace BaHuan.BusinessLayer
{
	
	public class CTBangKeNhapHangMgt
	{
	
		public ResultObj SaveNewCTBangKeNhapHang(CTBangKeNhapHang ctbangkenhaphang)
        		{
			ResultObj result = new ResultObj();
			ctbangkenhaphang.Id = -1;
			CTBangKeNhapHangDAO ctbangkenhaphangDAO = new CTBangKeNhapHangDAO();
			result = ctbangkenhaphangDAO.SaveCTBangKeNhapHang(ctbangkenhaphang);
			
			return result;
		}
		
		public ResultObj UpdateCTBangKeNhapHang(CTBangKeNhapHang ctbangkenhaphang)
        		{
			ResultObj result = new ResultObj();
			CTBangKeNhapHangDAO ctbangkenhaphangDAO = new CTBangKeNhapHangDAO();
			result = ctbangkenhaphangDAO.SaveCTBangKeNhapHang(ctbangkenhaphang);
			
			return result;
		}
		
		public ResultObj DeleteCTBangKeNhapHang(CTBangKeNhapHang ctbangkenhaphang)
        		{
			ResultObj result = new ResultObj();
			CTBangKeNhapHangDAO ctbangkenhaphangDAO = new CTBangKeNhapHangDAO();
			result = ctbangkenhaphangDAO.DeleteCTBangKeNhapHang(ctbangkenhaphang);
			
			return result;
		}
		
		public ResultObj GetAllCTBangKeNhapHang( )
        		{
			ResultObj result = new ResultObj();
			CTBangKeNhapHangDAO ctbangkenhaphangDAO = new CTBangKeNhapHangDAO();
			result = ctbangkenhaphangDAO.GetAllCTBangKeNhapHang();
			
			return result;
		}
		
		public ResultObj GetCTBangKeNhapHangById(CTBangKeNhapHang ctbangkenhaphang)
        		{
			ResultObj result = new ResultObj();
			CTBangKeNhapHangDAO ctbangkenhaphangDAO = new CTBangKeNhapHangDAO();
			result = ctbangkenhaphangDAO.GetAllCTBangKeNhapHangByID(ctbangkenhaphang);
			
			return result;
		}
        public ResultObj GetAllCTBangKeNhapHangByIdBangKe(CTBangKeNhapHang ctbangkenhaphang)
        		{
			ResultObj result = new ResultObj();
			CTBangKeNhapHangDAO ctbangkenhaphangDAO = new CTBangKeNhapHangDAO();
            result = ctbangkenhaphangDAO.GetAllCTBangKeNhapHangByIdBangKe(ctbangkenhaphang);
			
			return result;
		}
        
					
	}
}
